﻿using System;
using System.Runtime.Serialization;
using System.Linq;
using Invoicing.Model.Products;
namespace Invoicing.Model.Orders
{
    [DataContract]
    public class ProductOrderDetailModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model]
        [DataMember]
        public int OID { get; set; }
        [Model]
        [DataMember]
        public int ProductID { get; set; }
        [Model]
        [DataMember]
        public int MaterialID { get; set; }
        [Model]
        [DataMember]
        public int ProcessID { get; set; }
        [Model]
        [DataMember]
        public string Size { get; set; }
        [Model]
        [DataMember]
        public decimal Quantity { get; set; }
        [Model]
        [DataMember]
        public decimal CostMoney { get; set; }
        [Model]
        [DataMember]
        public decimal Balance { get; set; }

        #region Help
        [DataMember]
        public ProductModel Product { get; set; }
        [DataMember]
        public string MaterialName { get; set; }
        [DataMember]
        public string ProcessName { get; set; }
        #endregion
    }

    [DataContract]
    public class ProductOrderDetailCollection : ModelCollectionBase<ProductOrderDetailModel> { }
}
